package com.xbb.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xbb.entity.User;
import com.xbb.entity.UserParam;
import com.xbb.mapper.UserMapper;
import com.xbb.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import javax.validation.Valid;
import java.util.List;

@Service
public class UserServiceImpl extends ServiceImpl<UserMapper,User> implements UserService {
    @Autowired
    UserMapper userMapper;

    @Override
    public List<User> getZiXunShiByWeight(UserParam user) {
        return userMapper.getZiXunShiByWeight(user);
    }

    @Override
    public boolean updateZiXunShiWeight(User user) {
        return userMapper.updateZiXunShiWeight(user);
    }

    @Override
    public List<User> getQianDaoList(UserParam user) {
        return userMapper.getQianDaoList(user);
    }

    @Override
    public boolean updateBatchUser(List<Integer> ids, Integer i) {
        return userMapper.updateBatchUser(ids,i);
    }

    @Override
    public Integer updatePassWord(User user) {
        return userMapper.updatePassWord(user);
    }

    @Override
    public Integer updateWrongNum(String loginName) {
        return userMapper.updateWrongNum(loginName);
    }

    @Override
    public List<User> getUserNameByLoginName(@Valid User user) {
        return userMapper.getUserNameByLoginName(user);
    }

    @Override
    public List<User> getUserContainsRole(Integer id) {
        return userMapper.getUserContainsRole(id);
    }

    @Override
    public List<User> getWangLuoZiXunShiList(UserParam user) {
        return userMapper.getWangLuoZiXunShiList(user);
    }
}
